/**
 * 
 */
package com.surfilter.code.model;

import java.util.ArrayList;
import java.util.List;


/**
 * @author liuhe
 *
 */
public class PK {
    //外键包含的列
    private List<Field> cols = new ArrayList<Field>();
    
    //主键名称
    private String name;

	public List<Field> getCols() {
		return cols;
	}

	public void setCols(List<Field> cols) {
		this.cols = cols;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public boolean equals(Object o) {
        if (o instanceof PK) {
            return ((PK) o).name.equals(name);
        }
        return false;
    }

    public int hashCode() {
        return this.name.hashCode();
    }
    public String toString(){
        return "PK{"+this.name+","+this.cols+"}";
    }
}
